Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(be): calculate contest participants score #1643

Merged
merged 45 commits into from
Jul 22, 2024

Conversation

gyunseo
Copy link
Contributor

@gyunseo gyunseo commented Apr 8, 2024

Description

Contest에 참여한 Participants(User들)의 점수를 계산하는 feature를 개발했습니다.
close #1238

Additional context

  • ContestProblem에서 score field의 의미 변경(원래는 대회에서 각 문제들이 갖는 점수의 비율을 의미했는데, 이제는 문제가 갖는 점수 그 자체를 의미합니다.)
  • ContestRecord에 Pariticipant가 가장 최근에 AC를 받은 시각인 finishTime field를 추가했습니다. 리트 코드 예시 참고

How to Test on Local

admin, client 서버 다 켜야하고, DB에서 변경 사항을 확인해야 하기 때문에 Prisma Studio을 켜야 합니다.
그리고 또 Local에서 Judge를 해야 하므로, Iris도 Go Lang으로 Run해야 합니다.

pnpm start:dev admin
pnpm start:dev
pnpm prisma studio
cd iris
sudo -E go run main.go

Before submitting the PR, please make sure you do the following

Copy link

vercel bot commented Apr 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
codedang ✅ Ready (Inspect) Visit Preview Jul 22, 2024 8:51am

@cho-to
Copy link
Contributor

cho-to commented Apr 8, 2024

close 하려는 이슈 언급해주세요오 !

@Jaehyeon1020
Copy link
Member

노션 Task도 업데이트 해주세요~~ (pr 링크 연결도)

@Jaehyeon1020
Copy link
Member

1238- 로 시작하는 브랜치가 여러갠데, 안 쓰는 브랜치는 지워주세요!

@Jaehyeon1020
Copy link
Member

@gyunseo 이거 리뷰 하면 되나요?? 작업끝나셧나요!!

@cho-to
Copy link
Contributor

cho-to commented Jul 11, 2024

test fail난 것만 고치면 또 봐보겠습니다!
( 수정하기 전 코드는 제대로 실행되었어요 ! )

Copy link
Member

@Jaehyeon1020 Jaehyeon1020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Branch 한번 하고 머지해주세요~

@gyunseo gyunseo merged commit 85cdda0 into main Jul 22, 2024
9 checks passed
@gyunseo gyunseo deleted the 1238-calculate-contest-participants-score branch July 22, 2024 08:53
jihorobert pushed a commit that referenced this pull request Jul 28, 2024
* fix(be): add finish time field on contest record

* feat(be): add finish time

* feat(be): implement the calculation of contest participants score

* fix(be): change seed script for test

* fix(be): add accepted problem num increment logic

* fix(be): fix conflict exception message

* fix(be): refactor logic using early return

* fix(be): add comment to explain the fix

* test(be): add bruno api docs

* fix(be): resolve client submission test error

* fix(be): add to be equal

* fix(be): add promise resolve value of submission update stub

* test(be): add a test scenario for creating submission with constest id

* test(be): add test scenario for creating submission with workbook id

* test(be): add test scenario for creating submission for already AC problem

* test(be): add scenario for updating submission result with conest id

* chore(be): add comments on schema

* feat(be): add contest not found handling logic

* docs(be): add no contest found bru doc

* docs(be): add create submission for contest with accpeted code burno doc

* docs(be): add create submission for contest with wrong answer code bruno doc

* docs(be): add create submission for contest with time limit exceeded

* test(be): add contest find or throw mocking data

* test(be): add enable copy paste field to resolve type check error

* docs(be): fix bruno api docs description and assertion

* test(be): add invitation code to contest mock data

---------

Co-authored-by: Jiyun Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants